package impl

// ！主管
//
// 负责管理创建实例的过程，复杂初始化在这里编排
type director struct {
	builder abstractShoeBuilder
}

// 初始化
func NewDirector(a abstractShoeBuilder) *director {
	return &director{
		builder: a,
	}
}

// 装载新的构造器
func (d *director) SetBuilder(a abstractShoeBuilder) {
	d.builder = a
}

// 构造对象的具体过程
func (d *director) BuildShoe() shoe {
	d.builder.setCategory()

	return d.builder.getShoe()
}
